Device routines

void vinit
(char *device)
Tell VOGL what the device is. This routine needs to be called if the environment variable VDEVICE isn't set, or if the value in VDEVICE is not to be used.

  1. Current available devices are:
    amiga
    Amiga graphics implemented by Dr. Charles E. Campbell, Jr.
    apollo
    Apollo workstations
    cga
    IBM PC cga graphics card
    decX11
    The decstation (old) window manager. This is only included in case you need it.
    dxy
    Roland DXY plotter language
    ega
    IBM PC ega graphics card
    hercules
    IBM PC hercules graphics card
    hpgl
    HP Graphics language and compatibles
    NeXT
    NeXTStep
    postscript
    postscript devices
    ppostscript
    postscript devices (portrait mode)
    sigma
    IBM PC sigma graphics card.
    sun
    Sun workstations running sunview
    tek
    Tektronix 4010 and compatibles
    vga
    IBM PC vga graphics card
    X11
    X windows (SUN's Openwindows etc etc)

    Sun, X11, decX11, apollo, hercules, cga and ega support double buffering.

  2. If device is a NULL or a null string the value of the environment variable VDEVICE is taken as the device type to be opened.

  3. after init it is wise to explicitly clear the screen.
                 color(BLACK);
                 clear();
    

void ginit
()
Open the graphics device and do the basic initialisation. This routine is marked for obsolescence. The routine winopen (see below) should be used instead.

long winopen
(char *title)
Open the graphics device and do the basic initialisation. This routine should be used instead of ginit.

void gexit
()
Reset the window/terminal (must be the last VOGL rou tine called)

void voutput
(char *path)
Redirect output from next ginit to file given by path. This routine only applies to devices drivers that write to stdout e.g. postscript and hpgl.

void vnewdev
(char *device)
Reinitialize VOGL to use a new device without changing attributes, viewport etc. (eg. window and viewport specifications)

int getplanes
()
Returns the number of bit planes (or color planes) for a particular device. The number of colors displayable by the device is then 2(nplanes-1)